package com.shopping.mall.core.module.freight.mapper;

import com.shopping.mall.core.module.freight.entity.Freight;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * FreightMapper 接口
 * </p>
 *
 * @author zzy
 * @since 2021-08-28
 */
@Mapper
public interface FreightMapper extends BaseMapper<Freight> {

    @Select("select min(freight_price) from freight where goods_price <= #{totalPrice}")
    double getFreightByPrice(Double totalPrice);
}
